Add auto-generated template schema documentation#1166
Conversation
- Create generate_template_schema_docs.py script to generate HTML schema docs from backend JSON Schema using json-schema-for-humans - Update customize-document-templates.qmd to use generated include - Add template schema and permissions documentation sections to README.md The template schema is now regenerated from the v5 JSON schema in the backend repo, replacing the outdated hardcoded HTML. Closes sc-6164
bc9038a to
a75688a
Compare
|
Pull requests must include at least one of the required labels: |
1 similar comment
|
Pull requests must include at least one of the required labels: |
PR SummaryThis PR improves the documentation workflow for the template schema by introducing two major enhancements:
Additionally, the template documentation file ( Overall, the changes streamline the process of updating documentation by automating the extraction and formatting of backend JSON Schemas into readable site documentation. Test Suggestions
|
Summary
scripts/generate_template_schema_docs.pyto generate HTML schema documentation from the backend JSON Schema usingjson-schema-for-humanscustomize-document-templates.qmdto include the generated HTML instead of hardcoded contentContext
The template schema documentation in
customize-document-templates.qmdwas outdated (last generated June 2023) and hardcoded. This PR introduces a script-based approach similar to the permissions documentation, ensuring the schema reference stays in sync with the backend source.The script:
backend/src/backend/templates/documentation/model_documentation/mdd_template_schema_v5.jsonjson-schema-for-humanswith CSS overrides for Quarto compatibilitysite/guide/templates/_template-schema-generated.htmlTest plan
python scripts/generate_template_schema_docs.pyruns without errorsCloses sc-6164